<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .red{
        color: red
    }
    </style>
</head>
<body>
    <div id="root">
    </div>
</body>
<script src="./lib/react.development.js"></script>
<!-- 核心库文件 -->
<script src="./lib/react-dom.development.js"></script>
<!-- react虚拟DOM操作 -->
<script src="./lib/babel.min.js"></script>
<!-- 转JSX文件 -->
<script type="text/babel">
    function show(){
        alert(123)
    }
    function display(user={age:18}){
        return `年龄${user.age}`
    }
    let str='123';
    let styles = {
        color:'#2c2c2c'
    };
    let person={
        age:19
    }

    let a=<div><div style={styles} className='red' onClick={show}>welcome</div>{str}<span>{display(person)}</span></div>;
    ReactDOM.render(a,document.querySelector('#root'))
</script>
</html>